﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Echiquier
{
    public class Plateau
    {
        #region Attributs
        private static int _width, _height, _staticId;
        private int _id;
        private string _name;
        public int[,] _plateau { get; set; }
        #endregion

        #region Constructeur
        public Plateau()
            : this(DateTime.Now.ToString())
        {
            
        }

        public Plateau(string name)
        {
            _id = ++_staticId;
            _width = 8;
            _height = 8;
            _name = _id.ToString() + " - " + name;
            _plateau = new int[_width, _height];

            for (int i = 0; i < _width; ++i)
                    {
                        for (int j = 0; j < _height; ++j)
                        {
                            _plateau[i, j] = new Random().Next(PionSet.GetSingleton().Count);
                        }
                    }
        }
        #endregion

        #region Proprietes
        #endregion

        #region Methodes
        public override string ToString()
        {
            return _name;
        }
        #endregion
    }
}
